<?php

class admin_controller_user_admin_log extends admin_controller
{


    // 后台登陆日志
    public function listing()
    {
        $key = request('key', '');
        $success = request('success', -1);
        
        $model_admin_log = $this->get_admin_model();
        $template = $this->get_admin_template();
        $template->set_title('后台登陆日志');
        
        $limit = 20;
        $pagination = bone::get_ui('pagination');
        $pagination->set_limit($limit);
        $pagination->set_total($model_admin_log->get_log_sum($key, $success));
        $pagination->set_page(get('page', 1, 'int'));
        $pagination->update();
        
        $template->set('pagination', $pagination);
        $template->set('key', $key);
        $template->set('success', $success);
        $template->set('logs', $model_admin_log->get_logs($key, $success, $pagination->get_offset(), $limit));
        
        $template->display();
    }


}

?>